//--------------------------------------------------------------------------
// 
//  Copyright (c) Chili Software.  All rights reserved. 
// 
//  File: RelationParserException.cs
//
//  Description: Thrown if a relation can't be parsed.
// 
//--------------------------------------------------------------------------

using System;
using System.Runtime.Serialization;

namespace Chili.Opf3.Mapping
{
	/// <summary>
	/// Exception is thrown a relations set in the <see cref="Chili.Opf3.Relations.RelationAttribute">RelationAttribute</see> can't
	/// be parsed.
	/// </summary>
	/// <remarks>
	/// This exception is thrown a relations set in the <see cref="Chili.Opf3.Relations.RelationAttribute">RelationAttribute</see> can't
	/// be parsed. Usually this exception is thrown if the syntax of the relation is wrong.
	/// </remarks>
	[Serializable]
	public sealed class RelationsParserException : Exception
	{
		/// <summary>
		/// Creates a new instance of the
		/// <see cref="RelationsParserException">RelationsParserException Class</see>.
		/// </summary>
		private RelationsParserException(SerializationInfo info, StreamingContext context) : base(info, context)
		{
		}

		/// <summary>
		/// Creates a new instance of the
		/// <see cref="RelationsParserException">RelationsParserException Class</see>.
		/// </summary>
		public RelationsParserException()
		{
		}

		/// <summary>
		/// Creates a new instance of the
		/// <see cref="RelationsParserException">RelationsParserException Class</see>.
		/// </summary>
		/// <param name="message">A message that describes the current exception.</param>
		public RelationsParserException(string message)
			: base(message)
		{
		}

		/// <summary>
		/// Creates a new instance of the
		/// <see cref="RelationsParserException">RelationsParserException Class</see>.
		/// </summary>
		/// <param name="message">A message that describes the current exception.</param>
		/// <param name="inner">The exception that caused the current exception.</param>
		public RelationsParserException(string message, Exception inner) : base(message, inner)
		{
		}
	}
}
